package com.qidian.mes.device.service.impl;

import com.qidian.common.pojo.MESResult;
import com.qidian.mes.device.mapper.DeviceMapper;
import com.qidian.mes.device.service.DeviceService;
import com.qidian.mes.pojo.Device;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author 刘泽磊
 * @Company 起点编程
 * @Description
 * @Time 2024/10/16 18:54
 */
@Service
public class DeviceServiceImpl implements DeviceService {
    @Autowired
    private DeviceMapper deviceMapper;
    @Override
    public MESResult select(Device device) {
        return MESResult.success(deviceMapper.select(device));
    }

    @Override
    public MESResult insert(Device device) {
        return MESResult.success(deviceMapper.insert(device));
    }

    @Override
    public MESResult update(Device device) {
        return MESResult.success(deviceMapper.update(device));
    }

    @Override
    public MESResult selectById(Long deviceId) {
        return MESResult.success(deviceMapper.selectById(deviceId));
    }

    @Override
    public MESResult delete(Long deviceId) {
        return MESResult.success(deviceMapper.delete(deviceId));
    }
}
